import { createRouter, createWebHashHistory, RouteRecordRaw } from "vue-router";
const routes: Array<RouteRecordRaw> = [
  {
    path: "/",
    redirect: "/button",
  },
  {
    path: "/",
    name: "Home",
    component: () => import("../components/Home.vue"),
    children: [
      {
        path: "button",
        name: "button",
        component: () => import("../components/button.vue"),
      },
      {
        path: "layout",
        name: "layout",
        component: () => import("../components/layout.vue"),
      },
      {
        path: "checkBox",
        name: "checkBox",
        component: () => import("../components/checkBox.vue"),
      },
      {
        path: "transfer",
        name: "transfer",
        component: () => import("../components/transfer.vue"),
      },
      {
        path: "message",
        name: "message",
        component: () => import("../components/message.vue"),
      },
      {
        path: "select",
        name: "select",
        component: () => import("../components/select.vue"),
      },
      {
        path: "textarea",
        name: "textarea",
        component: () => import("../components/textarea.vue"),
      },
      {
        path: "collapse",
        name: "collapse",
        component: () => import("../components/collapse.vue"),
      },
      {
        path: "form",
        name: "form",
        component: () => import("../components/form.vue"),
      },
    ],
  },
];
const router = createRouter({
  routes,
  history: createWebHashHistory(),
});
export default router;
